<form id="FormUsers" name="FormUsers" action="?module=backoffice&action=AjaxContext&href={$href}" method="post" class="nyroModal">
{t assignTo=title}Add user{/t}
    {include file="$MODULES_DIR/backoffice/templates/block/modal/ModalTitle.html" title=$title}
<div id="modalContent">
    <div id="tab1" class="modalTab">
	    <table class="listTable">
	    <tr>
	      <td><label>{t}Login{/t}* : </label></td>
	      <td><input type="text" name="FormUsers[login]" value="{if isset($values.login)}{$values.login}{/if}"  /></td>
	      {if isset($errors.login) && count($errors.login) > 0}<td>{foreach from=$errors.login item=error}<span>{icon name="warning.png"} {$error}</span><br/>{/foreach}</td>{/if}
	    </tr>  
	    <tr>
	      <td><label>{t}Password{/t}* : </label></td>
	      <td><input type="password" name="FormUsers[password]" value=""  /></td>
	      {if isset($errors.password) && count($errors.password) > 0}<td>{foreach from=$errors.password item=error}<span>{icon name="warning.png"} {$error}</span><br/>{/foreach}</td>{/if}
	    </tr>
	    <tr>
	      <td><label>{t}Retype your password{/t}* : </label></td>
	      <td><input type="password" name="FormUsers[password2]" value=""  /></td>
	      {if isset($errors.password2) && count($errors.password2) > 0}<td>{foreach from=$errors.password2 item=error}<span>{icon name="warning.png"} {$error}</span><br/>{/foreach}</td>{/if}
	    </tr>
		<tr>
	      <td><label>{t}E-mail{/t}* : </label></td>
	      <td><input type="text" name="FormUsers[mail]" value="{if isset($values.mail)}{$values.mail}{/if}" style="width: 200px;" /></td>
	      {if isset($errors.mail) && count($errors.mail) > 0}<td>{foreach from=$errors.mail item=error}<span>{icon name="warning.png"} {$error}</span><br/>{/foreach}</td>{/if}
	    </tr>
		<tr>
	      <td><label>{t}Select the group{/t} : </label></td>
	      <td>
	        <select name="FormUsers[group]"  >
	{foreach from=$relatedDocs item=group}
                <option value="{$group->getUniqueId()}" {if isset($values.group) && $values.group == $group->getUniqueId()}selected="selected"{else}{if !isset($values.group) && isset($docId) && $docId == $group->getUniqueId()}selected="selected"{/if}{/if}>{$group->getLabel()}</option>
	{/foreach}
	        </select>
	      </td>
	      {if isset($errors.group) && count($errors.group) > 0}<td>{foreach from=$errors.group item=error}<span>{icon name="warning.png"} {$error}</span><br/>{/foreach}</td>{/if}
	    </tr>
        </table>
    </div>
</div>
{t assignTo=footerTitle}Save{/t}
{include file="$MODULES_DIR/backoffice/templates/block/modal/ModalFooter.html" label=$footerTitle}
</form>

